from waftools.pebble_test import clar

def build(ctx):
    clar(ctx,
         sources_ant_glob=" src/fw/applib/app_message/app_message.c"
                          " src/fw/applib/app_message/app_message_outbox.c"
                          " src/fw/applib/app_message/app_message_inbox.c"
                          " src/fw/util/rand/rand.c"
                          " third_party/tinymt/TinyMT/tinymt/tinymt32.c"
                          " src/fw/process_management/pebble_process_info.c"
                          " src/fw/util/dict.c",
         test_sources_ant_glob="test_app_message.c")

    clar(ctx,
         sources_ant_glob=(" src/fw/applib/app_inbox.c"
                           " src/fw/services/normal/app_inbox_service.c"
                           ),
         test_sources_ant_glob="test_app_inbox.c",
         override_includes=['dummy_board'])

    clar(ctx,
         sources_ant_glob=(" src/fw/applib/app_outbox.c"
                           " src/fw/services/normal/app_outbox_service.c"
                           ),
         test_sources_ant_glob="test_app_outbox.c",
         override_includes=['dummy_board'])

    clar(ctx,
         sources_ant_glob=(" src/fw/applib/cpu_cache.c"
                           " src/libos/mcu/cache_arm.c"
                           ),
         test_sources_ant_glob="test_cpu_cache.c",
         defines=["UNITTEST_WITH_SYSCALL_PRIVILEGES=1"],
         override_includes=['dummy_board'])

    clar(ctx,
        sources_ant_glob = (
            " src/fw/flash_region/filesystem_regions.c"
            " src/fw/flash_region/flash_region.c "
            " src/fw/util/dict.c"
            " src/fw/applib/persist.c"
            " src/fw/util/rand/rand.c"
            " third_party/tinymt/TinyMT/tinymt/tinymt32.c"
            " src/fw/services/normal/filesystem/app_file.c"
            " src/fw/services/normal/filesystem/flash_translation.c"
            " src/fw/services/normal/filesystem/pfs.c"
            " src/fw/services/normal/legacy/persist_map.c"
            " src/fw/services/normal/persist.c"
            " src/fw/services/normal/settings/settings_file.c"
            " src/fw/services/normal/settings/settings_raw_iter.c"
            " src/fw/util/crc8.c"
            " src/fw/util/legacy_checksum.c"
            " tests/fakes/fake_rtc.c"
            " tests/fakes/fake_spi_flash.c"
            " tests/fixtures/resources/builtin_resources.auto.c"
        ),
        test_sources_ant_glob = "test_persist.c",
        override_includes=['dummy_board'])

    clar(ctx,
        sources_ant_glob = (
            " src/fw/flash_region/flash_region.c"
            " src/fw/applib/pbl_std/pbl_std.c"
            " tests/fakes/fake_rtc.c"
            " tests/fakes/fake_spi_flash.c"
        ),
        test_sources_ant_glob = "test_pbl_std.c",
        override_includes=['dummy_board'])

    clar(ctx,
        sources_ant_glob = (
            " src/fw/applib/graphics/gbitmap.c"
            " src/fw/applib/graphics/gcolor_definitions.c"
            " src/fw/applib/graphics/gtypes.c"
            " src/fw/applib/graphics/text_render.c"
            " src/fw/applib/fonts/codepoint.c"
            " tests/fakes/fake_gbitmap_png.c"
        ),
        test_sources_ant_glob = "test_text_render.c",
        override_includes=['dummy_board'])

    clar(ctx,
        sources_ant_glob = "  src/fw/flash_region/flash_region.c" \
                           "  src/fw/flash_region/filesystem_regions.c" \
                           "  src/fw/system/hexdump.c" \
                           "  src/fw/applib/fonts/codepoint.c" \
                           "  src/fw/applib/fonts/fonts.c" \
                           "  src/fw/applib/graphics/text_resources.c" \
                           "  src/fw/resource/resource.c" \
                           "  src/fw/resource/resource_storage.c" \
                           "  src/fw/resource/resource_storage_builtin.c" \
                           "  src/fw/resource/resource_storage_file.c" \
                           "  src/fw/resource/resource_storage_flash.c" \
                           "  src/fw/services/normal/filesystem/flash_translation.c" \
                           "  src/fw/services/normal/filesystem/pfs.c" \
                           "  src/fw/services/normal/filesystem/app_file.c" \
                           "  src/fw/util/crc8.c" \
                           "  src/fw/util/legacy_checksum.c" \
                           "  src/fw/drivers/flash/flash_crc.c" \
                           "  tests/fakes/fake_rtc.c" \
                           "  tests/fakes/fake_spi_flash.c" \
                           "  tests/fixtures/resources/builtin_resources.auto.c" \
                           "  tests/fixtures/resources/pfs_resource_table.c",
        test_sources_ant_glob = "test_text_resources.c",
        override_includes=['dummy_board'])

    clar(ctx,
        sources_ant_glob = "  src/fw/applib/ui/bitmap_layer.c" \
                           "  src/fw/applib/ui/layer.c" \
                           "  tests/fakes/fake_gbitmap_png.c" \
                           "  src/fw/applib/graphics/gcolor_definitions.c" \
                           "  src/fw/applib/graphics/gtypes.c",
        test_sources_ant_glob = "test_bitmap_layer.c",
        override_includes=['dummy_board'])

    clar(ctx,
        sources_ant_glob = "src/fw/applib/app_smartstrap.c" \
            " src/fw/services/normal/accessory/smartstrap_attribute.c" \
            " src/fw/util/mbuf.c" \
            " tests/fakes/fake_smartstrap_connection.c" \
            " tests/fakes/fake_smartstrap_profiles.c" \
            " tests/fakes/fake_smartstrap_state.c",
        test_sources_ant_glob = "test_app_smartstrap.c",
        defines=["CAPABILITY_HAS_ACCESSORY_CONNECTOR=1"],
        override_includes=['dummy_board'])

    clar(ctx,
         sources_ant_glob=(
            "src/fw/applib/graphics/gtypes.c "
            "src/fw/applib/ui/layer.c "
            "src/fw/applib/unobstructed_area_service.c "
            "tests/fakes/fake_events.c "
         ),
         test_sources_ant_glob="test_unobstructed_area_service.c",
         override_includes=['dummy_board'])

    clar(ctx,
         sources_ant_glob=(
             " src/fw/applib/app_glance.c"
             " src/fw/applib/template_string.c"
             " src/fw/services/normal/app_glances/app_glance_service.c"
             " src/fw/services/normal/blob_db/app_glance_db.c"
             " src/fw/services/normal/timeline/attribute.c"
             " src/fw/util/crc8.c"
             " src/fw/util/lru_cache.c"
             " tests/fakes/fake_rtc.c"
             " tests/fakes/fake_settings_file.c"
         ),
         test_sources_ant_glob="test_app_glance.c",
         defines=["CAPABILITY_HAS_APP_GLANCES=1"],
         override_includes=['dummy_board'])

    clar(ctx,
         sources_ant_glob=(
            "src/fw/applib/template_string.c "
         ),
         test_sources_ant_glob="test_template_string.c",
         override_includes=['dummy_board'])


# vim:filetype=python
